package org.example.util;

import javax.persistence.EntityManager;
import javax.persistence.Query;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

public class Util {
    public static void nativeQuery(EntityManager em,String s){
        System.err.println(String.join("", Collections.nCopies(50,"-")));
        System.err.println(s);
        Query query = em.createQuery(s);
        List list = query.getResultList();
        list.forEach(o -> {
            System.err.println(Arrays.toString((Object[]) o));
        });
    }
}
